home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d878.lha
/
DrChip
/
hdrtag
/
hdrtag.doc
< prev
next >
Wrap
Text File
|
1993-06-14
|
6KB
|
142 lines
Header Tags v1.06 Copyright 1993 Charles E. Campbell, Jr
----------------------------------------------------------
Copyright:
This program (hdrtag) and associated documents are copyrighted 1993
by Charles E. Campbell, Jr, PhD.
Restrictions:
All rights to hdrtag and its documents are reserved, except for those
explicitly granted herein.
No representation or warranties are made with respect to the accuracy,
reliability, performance, or operation of this software, and all such
use is at your own risk. The author does not assume any responsiblity
or liability whatsoever with respect to your use of this software.
Hdrtag may not be included with any commercial product nor may it be
sold for profit either separately or as part of a compilation without
the permission of Dr. Charles E. Campbell, Jr. It may be included in
non-profit disk collections such as the Fred Fish collection. It may
be archived and uploaded to electronic bulletin board systems so long
as all files remain together and unaltered. It may be copied to and used on
individuals' computer systems.
Author : Dr. Charles E. Campbell, Jr.
Contact: cec@gryphon.gsfc.nasa.gov
Version: 1.06
Usage:
hdrtag [-options] {*.h | directory-names}
hdrtag "?"
Options:
-a: use antimagic on patterns
-Amagic: specify "magic" characters for antimagic
-g: tag global variables, prototypes, etc
-h: restrict hdrtag processing to *.h files
-m: merge hdrtags with tags
-M: merge hdrtags with current hdrtags
-p: c++ mode: tag global variables, prototypes, etc
-r: permit recursive descent down directories (ie. do subdirectories, too)
-s: system header file handler (fixed, static files)
-v: verbose mode
-x: toggle exclude duplicates (default is to exclude)
Explanation
The hdrtag program examines header files and creates a <hdrtags> file with
<tags>-style information on how to tag to
structure names
typedefs
#define labels
enum names
enumerated types
and optionally (-g) to
global variables
prototype function names
and anything which is not a C or C++ keyword.
Examples of use:
cd include: # go to your compiler's header files
hdrtags -garvh include: # generate a <hdrtags> file
rename hdrtags tags # editors use <tags>, not <hdrtags>
vim -t ARG0 # go to the file & line where ARG0 is defined
vim -t putc # go find the prototype for putc
vim -t BPTR # go to the file & line wher BPTR is defined
Note that editors (ViM, Z, emacs) use a <tags> file, so hdrtag can optionally
merge the hdrtags into a pre-existing tags file instead using the -m option.
Alternatively, one may use the flist program with its -m option generate a
<tags> file and to merge a pre-existing <hdrtags> file into it. This latter
method is probably the more useful of the two.
Not all editors use magic characters during tags processing. ViM, for example,
only uses a subset of magic characters when it handles tags (ex. the asterisk
is not magic when its handling tags). The antimagic facility allows one to
customize hdrtag's handling of magic characters.
The antimagic facility inserts backslashes (\) before "magic" characters.
The default set of magic characters is: ^$.[]|\ . If your favorite program
needs a different set of magic characters, two methods are provided:
1) use the -Astring (or -A string) option, where the string is your set
of magic characters
2) set an environment variable, HDRTAGMAGIC, to the magic characters
your favorite editor needs in tag files.
The hdrtag program will give help with
hdrtag "?"
For those of you with Aztec C or SAS C, the include: directory hierarchy
holds your header files. I suggest using
hdrtag -garvh include:
to process the header files therein. Doing so, however, will take up over
3MB of ram. Afterwards, one may wish to
rename hdrtags tags
and leave the file in the include: directory. Over 5500 tags will result!
I'd distribute the resulting tags files myself, but SAS informs me that there
may be copyright problems with Commodore. So, please do *not* distribute
the tags files you generate from the include: hierarchy.
Options are not restricted to appearing at the beginning. The hdrtag program
will examine all command line arguments first and process those beginning
with '-' as options. One may concatenate arguments (ie. -garvh) or separate
them (ie. -ga -v -rh). Options may also be specified with a leading '+'
which will be processed in sequence with the other arguments
(ie. hdrtag -a one.h +g two.h).
The -s flag may or may not be useful to you. On *IX systems, the vi editor
can tag not only to search strings (/some string where the tagged info is),
but can tag to a line number. Obviously, the latter tagline is rather shorter,
thereby conserving file space and improving tagging times. Since line
numbers are used, however, the header files so processed should be more or
less static, and system header files fit this bill nicely.
The hdrtag program was compiled with Aztec C on an A3000 with the following
options: CCOPTS=-qf -wp -c2 -f8. One may wish to move <rdcolor.dat> to the
s: directory. The file provides a mapping from color strings to escape
sequences, and it should be fairly obvious as to how to modify it to suit
your requirements.
Good luck, and let me know of any problems you encounter, and any attaboys
will be appreciated :)